import request from '@/utils/request'
import product from "@/views/shopping/product";

// 查询商品管理列表
export function listProduct(query) {
  return request({
    url: '/shopping/product/list',
    method: 'get',
    params: query
  })
}



// 查询商品管理详细
export function getProduct(id) {
  return request({
    url: '/shopping/product/' + id,
    method: 'get'
  })
}

// 新增商品管理
export function addProduct(data) {
  return request({
    url: '/shopping/product',
    method: 'post',
    data: data
  })
}

// 修改商品管理
export function updateProduct(data) {
  return request({
    url: '/shopping/product',
    method: 'put',
    data: data
  })
}

// 删除商品管理
export function delProduct(id) {
  return request({
    url: '/shopping/product/' + id,
    method: 'delete'
  })
}

//获取商品sku
export function getSku(id) {
  return request({
    url: '/shopping/product/sku/' + id,
    method: 'get'
  })
}


//修改sku
export function updateSku(data) {
  return request({
    url: '/shopping/product/updateSku',
    method: 'put',
    data: data
  })
}



export function updateVerifyStatus(id) {
  return request({
    url: `/shopping/product/verifyStatus/${id}`,
    method: 'put'
  })
}
